﻿using System;
using System.Collections.Generic;
using Ewk.MachineLearning.Genetic.Programming.Program.Functions;

namespace Ewk.MachineLearning.Genetic.Programming.Program.Terminals
{
    public abstract class Terminal : ITerminalDefinition
    {
        protected Terminal(Type outputType)
        {
            OutputDefinition = new IODefinition(
                new List<Type>
                    {
                        outputType
                    }
                );
        }

        #region Implementation of ITerminalDefinition

        /// <summary>
        /// Gets the <see cref="IODefinition"/> of this function.
        /// </summary>
        public IODefinition OutputDefinition { get; private set; }

        /// <summary>
        /// The function that is used to transform the parameters.
        /// </summary>
        public dynamic Value { get; protected set; }

        #endregion
    }
}